package com.itheima.dao;

import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 32338
 * @date 2024-05-03 19:39:48
 * @description 检查项和检查组的中间表
 */
@Mapper
public interface Check_ItemAndGroup {

    void save(Integer checkGroupId, List<Integer> checkitemIds);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_id = #{checkGroupId}")
    void deleteByGroupId(Integer checkGroupId);


    @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{checkGroupId}")
    List<Integer> findItemIdsByGroupId(Integer checkGroupId);

}
